import request from '@/utils/request'

// 查询楼宇管理列表
export function listGroup(query) {
  return request({
    url: '/house/group/list',
    method: 'get',
    params: query
  })
}

// 查询楼宇管理详细
export function getGroup(groupId) {
  return request({
    url: '/house/group/' + groupId,
    method: 'get'
  })
}
// 获取小区信息
export function getAreaInfo1(areaName) {
  return request({
    url: '/house/area/list2/'+areaName,
    method: 'get'
  })
}


// 新增楼宇管理
export function addGroup(data) {
  return request({
    url: '/house/group',
    method: 'post',
    data: data
  })
}

// 修改楼宇管理
export function updateGroup(data) {
  return request({
    url: '/house/group',
    method: 'put',
    data: data
  })
}

// 删除楼宇管理
export function delGroup(groupId) {
  return request({
    url: '/house/group/' + groupId,
    method: 'delete'
  })
}

// 获取小区信息
export function getAreaInfo() {
  return request({
    url: '/house/area/list1',
    method: 'get'
  })
}

export function moveGroup(data) {
  return request({
    url: '/house/group/moveGroup',
    method: 'put',
    data: data
  })
}
